<template>
  <!-- 配置路由出口 -->
  <router-view v-slot="{ Component }">
    <keep-alive>
      <component :is="Component" v-if="$route.meta.keepAlive" />
    </keep-alive>
    <component :is="Component" v-if="!$route.meta.keepAlive" />
  </router-view>
  <!-- 底部的tabbar -->
  <van-tabbar route v-model="active">
    <van-tabbar-item to="/" icon="home-o">首页</van-tabbar-item>
    <!-- <van-tabbar-item icon="search">标签</van-tabbar-item>
    <van-tabbar-item icon="friends-o">标签</van-tabbar-item> -->
    <van-tabbar-item to="/my" icon="setting-o">我的</van-tabbar-item>
  </van-tabbar>
</template>

<script>
export default {
  name: 'tabbar',
  data () {
    return {
      active: 0
    }
  }
}
</script>

<style></style>
